package Student;

class Student1 {
    String name;
    int age;
    void read(){
        System.out.println("my name is "+name +",years" + age);
    }
}


public class Example02 {
    public static void main(String[] args) {
        Student1 stu1 = new Student1();
        Student1 stu2 = null;
        stu2 = stu1;
        stu1.name = "小明";
        stu1.age = 20;
        stu2.age = 50;
        stu1.read();
        stu2.read();
    }
}
